﻿using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Windows.Forms;
using SysColor = System.Drawing.Color;
using SysRectangle = System.Drawing.Rectangle;

namespace PO_2011
{
    public class PNM_Data
    {
        protected int index;

        public Bitmap bitmap;

        public BinaryReader binReader;

        protected ImagePackageInfo header;

        public ImagePackageInfo Header
        {
            get { return header; }
            set { header = value; }
        }

        protected byte[] imageData;

        public byte[] ImageData
        {
            get { return imageData; }
            set { imageData = value; }
        }

        protected PixelFormat pixelFormat;

        public PixelFormat PixelFormat
        {
            get { return pixelFormat; }
        }

        protected int bytesPerPixel;

        public int BytesPerPixel
        {
            get { return bytesPerPixel; }
        }

        protected int stride;

        public int Stride
        {
            get { return stride; }
            set { stride = value; }
        }

        [Serializable]
        public struct ImagePackageInfo
        {
            private string magic_number;

            public string MagicNumber
            {
                get { return magic_number; }
                set { magic_number = value; }
            }

            private int width;

            public int Width
            {
                get { return width; }
                set { width = value; }
            }

            private int height;
            
            public int Height
            {
                get { return height; }
                set { height = value; }
            }

            private int depth;
            
            public int Depth
            {
                get { return depth; }
                set { depth = value; }
            }
        }

    }
}
